package xddq

import (
	"fmt"
	"time"
	D "websocket_apn/define"
	"websocket_apn/log"
	"websocket_apn/proto"
)

// 处理问道盛会信息结果
func (xd *XdDriver) CheckAskWayInfoData(allInfo D.AskWayInfo) {
	if !allInfo.Flag && allInfo.People[0].CombatValue > 0 {
		log.Infof("问道盛会-领取竞猜币, 竞猜 %s 妖力%s", allInfo.People[0].ID, D.GetCombatValueDesc(allInfo.People[0].CombatValue))
		xd.Send(proto.Get_Cmd_Data(xd.userInfo.PlayerId, proto.S_ASKWAY_GetGuessCoin, fmt.Sprintf("08 %s", xd.UserData.Activity[D.Activity_Ask_Grand_Event].ID)))
		time.Sleep(time.Second)
		xd.Send(proto.Get_Cmd_Data(xd.userInfo.PlayerId, proto.S_ASKWAY_ToSkyGuess, fmt.Sprintf("08 %s 10 %s 18 F4 03 20 05", xd.UserData.Activity[D.Activity_Ask_Grand_Event].ID, allInfo.People[0].ID)))
		return
	}
	xd.UserData.FightInfo.AskWay <- allInfo
}
